package com.door.erp.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.door.erp.enums.BaseInfoStatus;

/**
 * 产品
 * @author yangxuelin
 */
@Entity
@Table(name = "product", catalog = "door")
public class Product implements Serializable {

	private static final long serialVersionUID = 2904265269057696316L;

	private long id;
	
	private String name;
	
	private float length;
	
	private float width;
	
	private float height;
	
	private Color color;
	
	private BaseInfoStatus status;
	
	private String remark;
	
	private String imagePath;

	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "length4")
	public float getLength() {
		return length;
	}

	public void setLength(float length) {
		this.length = length;
	}

	@Column(name = "width")
	public float getWidth() {
		return width;
	}

	public void setWidth(float width) {
		this.width = width;
	}

	@Column(name = "height")
	public float getHeight() {
		return height;
	}

	public void setHeight(float height) {
		this.height = height;
	}

	@ManyToOne
	@JoinColumn(name = "colorId", updatable = true)
	public Color getColor() {
		return color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	@Column(name = "status")
	public BaseInfoStatus getStatus() {
		return status;
	}

	public void setStatus(BaseInfoStatus status) {
		this.status = status;
	}
	
	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Column(name = "imagePath")
	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}
	
	

}
